package com.eshop.modules.canvas.domain;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.eshop.domain.BaseDomain;

@TableName("store_canvas")
public class StoreCanvas extends BaseDomain
{
    @TableId
    private Long canvasId;
    @NotNull
    private Integer terminal;
    private String json;
    private Integer type;
    @NotBlank
    private String name;
    private Long shopId;
    
    public void copy(final StoreCanvas source) {
        BeanUtil.copyProperties((Object)source, (Object)this, CopyOptions.create().setIgnoreNullValue(true));
    }
    
    public Long getCanvasId() {
        return this.canvasId;
    }
    
    public Integer getTerminal() {
        return this.terminal;
    }
    
    public String getJson() {
        return this.json;
    }
    
    public Integer getType() {
        return this.type;
    }
    
    public String getName() {
        return this.name;
    }
    
    public Long getShopId() {
        return this.shopId;
    }
    
    public void setCanvasId(final Long canvasId) {
        this.canvasId = canvasId;
    }
    
    public void setTerminal(final Integer terminal) {
        this.terminal = terminal;
    }
    
    public void setJson(final String json) {
        this.json = json;
    }
    
    public void setType(final Integer type) {
        this.type = type;
    }
    
    public void setName(final String name) {
        this.name = name;
    }
    
    public void setShopId(final Long shopId) {
        this.shopId = shopId;
    }
    
    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof StoreCanvas)) {
            return false;
        }
        final StoreCanvas other = (StoreCanvas)o;
        if (!other.canEqual(this)) {
            return false;
        }
        final Object this$canvasId = this.getCanvasId();
        final Object other$canvasId = other.getCanvasId();
        Label_0065: {
            if (this$canvasId == null) {
                if (other$canvasId == null) {
                    break Label_0065;
                }
            }
            else if (this$canvasId.equals(other$canvasId)) {
                break Label_0065;
            }
            return false;
        }
        final Object this$terminal = this.getTerminal();
        final Object other$terminal = other.getTerminal();
        Label_0102: {
            if (this$terminal == null) {
                if (other$terminal == null) {
                    break Label_0102;
                }
            }
            else if (this$terminal.equals(other$terminal)) {
                break Label_0102;
            }
            return false;
        }
        final Object this$type = this.getType();
        final Object other$type = other.getType();
        Label_0139: {
            if (this$type == null) {
                if (other$type == null) {
                    break Label_0139;
                }
            }
            else if (this$type.equals(other$type)) {
                break Label_0139;
            }
            return false;
        }
        final Object this$shopId = this.getShopId();
        final Object other$shopId = other.getShopId();
        Label_0176: {
            if (this$shopId == null) {
                if (other$shopId == null) {
                    break Label_0176;
                }
            }
            else if (this$shopId.equals(other$shopId)) {
                break Label_0176;
            }
            return false;
        }
        final Object this$json = this.getJson();
        final Object other$json = other.getJson();
        Label_0213: {
            if (this$json == null) {
                if (other$json == null) {
                    break Label_0213;
                }
            }
            else if (this$json.equals(other$json)) {
                break Label_0213;
            }
            return false;
        }
        final Object this$name = this.getName();
        final Object other$name = other.getName();
        if (this$name == null) {
            if (other$name == null) {
                return true;
            }
        }
        else if (this$name.equals(other$name)) {
            return true;
        }
        return false;
    }
    
    protected boolean canEqual(final Object other) {
        return other instanceof StoreCanvas;
    }
    
    public int hashCode() {
        final int PRIME = 59;
        int result = 1;
        final Object $canvasId = this.getCanvasId();
        result = result * 59 + (($canvasId == null) ? 43 : $canvasId.hashCode());
        final Object $terminal = this.getTerminal();
        result = result * 59 + (($terminal == null) ? 43 : $terminal.hashCode());
        final Object $type = this.getType();
        result = result * 59 + (($type == null) ? 43 : $type.hashCode());
        final Object $shopId = this.getShopId();
        result = result * 59 + (($shopId == null) ? 43 : $shopId.hashCode());
        final Object $json = this.getJson();
        result = result * 59 + (($json == null) ? 43 : $json.hashCode());
        final Object $name = this.getName();
        result = result * 59 + (($name == null) ? 43 : $name.hashCode());
        return result;
    }
    
    public String toString() {
        return "StoreCanvas(canvasId=" + this.getCanvasId() + ", terminal=" + this.getTerminal() + ", json=" + this.getJson() + ", type=" + this.getType() + ", name=" + this.getName() + ", shopId=" + this.getShopId() + ")";
    }
}
